﻿CREATE TYPE [dbo].[udtJobs] AS TABLE (
    [JobID]           UNIQUEIDENTIFIER NOT NULL,
    [UserID]          INT              NOT NULL,
    [JobType]         INT              NOT NULL,
    [Title]           NVARCHAR (255)   NOT NULL,
    [Einheit]         CHAR (5)         NOT NULL,
    [Fahrzeug]        CHAR (5)         NOT NULL,
    [Datum]           SMALLDATETIME    NOT NULL,
    [StartTime]       TIME (7)         NULL,
    [EndTime]         TIME (7)         NULL,
    [Leistung]        NVARCHAR (255)   NULL,
    [LeistungProzent] DECIMAL (11, 2)  NOT NULL,
    [LeistungZeit]    DECIMAL (11, 2)  NOT NULL,
    [ProjektName]     NVARCHAR (255)   NULL,
    [Status]          SMALLINT         NOT NULL,
    [CashSaleID]      INT              NULL,
    [ProjectID]       INT              NULL,
    [Area]            NVARCHAR (50)    NULL,
    [SubArea]         NVARCHAR (50)    NULL,
    [Sb]              NVARCHAR (50)    NULL,
    [Ss]              NVARCHAR (50)    NULL,
    [Datei]           NVARCHAR (150)   NULL,
    [Fa]              NVARCHAR (50)    NULL,
    [Vr]              NVARCHAR (50)    NULL);


GO
GRANT CONTROL
    ON TYPE::[dbo].[udtJobs] TO PUBLIC;


GO
GRANT REFERENCES
    ON TYPE::[dbo].[udtJobs] TO PUBLIC;


GO
GRANT TAKE OWNERSHIP
    ON TYPE::[dbo].[udtJobs] TO PUBLIC;

